<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>demo</title>
    <script src="../node_modules/vue/dist/vue.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
    
    <div id="app">
        <h1>用户名：{{username}}</h1>
        <h3 v-if="isVip">用户类型：VIP</h3>
        <h3 v-else>用户类型：普通用户</h3>
        <hr>
        <h1>用户允许登录时间</h1>
        <h3 v-if="age>=18">运行登录12小时</h3>
        <h3 v-else-if="age>=15">运行登录8小时</h3>
        <h3 v-else>运行登录4小时</h3>
    </div>

    <script type="text/javascript">
        // console.log(Vue)
        let app = new Vue({
            el:"#app",
            data:{
                isVip:true,
                username:'王小胖',
                age:5
            }
        })
    </script>
</body>
</html>